﻿<%@ WebHandler Language="C#" Class="Delete" %>

using System;
using System.Web;

public class Delete : IHttpHandler {
    
    public void ProcessRequest (HttpContext context) {
        context.Response.ContentType = "text/plain";
        string sid = context.Request.QueryString["sid"].ToString();
        int id = int.Parse(sid);
        string sql = "delete from dataproduct where id=" + id;
        int k = App_Code.PublicHelper.DatabaseHelper.ExecuteNonQuery(sql);
        if (k != -1)
        {
            context.Response.Write("true");
        }
        else
        {
            context.Response.Write("false");
        }
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}